package demo1;
public class TestAnimal {
    public static void eat(Animal a){
        a.eat();
    }
    public static void main(String[] args) {
        Cat cat = new Cat(" 元宝 ",2);
        Dog dog = new Dog("⼩七 ", 1);
        eat(cat);
        eat(dog);
    }
}